﻿#region Usings
using BK.Model;

using Lib.Utils.WorkerUtils;
#endregion

namespace BK.Import.Console
{
	internal static class Program
	{
		#region Class Methods
		private static void Main()
		{
            //BkDataContext context = new BkDataContext();

		    var bestExpenseFilesWorkerItem = new BestExpenseFilesWorkerItem();
		    var bestExpensesWorkerItem = new BestExpensesWorkerItem();
		    var financistoFilesWorkerItem = new FinancistoFilesWorkerItem();
		    var financistoExpensesWorkerItem = new FinancistoExpensesWorkerItem();

            //		    WorkerItemsContainer workerItemsContainer = new WorkerItemsContainer(new IWorkerItem[]
//			                                                                     	{
//			                                                                     		bestExpenseFilesWorkerItem,
//                                                                                        bestExpensesWorkerItem,
//			                                                                     		financistoFilesWorkerItem, 
//                                                                                        financistoExpensesWorkerItem
//			                                                                     	});

//			workerItemsContainer.Start();


            while (true)
            {
                bestExpenseFilesWorkerItem.Execute();
                bestExpensesWorkerItem.Execute();
                financistoExpensesWorkerItem.Execute();
                financistoFilesWorkerItem.Execute();
            }

		    System.Console.WriteLine("Press ENTER to exit... ");
			System.Console.ReadLine();

			//workerItemsContainer.Stop();

            bestExpenseFilesWorkerItem.Stop();
            bestExpensesWorkerItem.Stop();
            financistoExpensesWorkerItem.Stop();
            financistoFilesWorkerItem.Stop();
		}
		#endregion
	}
}